<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	 <link rel="stylesheet" type="text/css" href="../css/reset.css" th:href="@{${uiPath} + ${appName} + '/css/reset.css'}"/>
       <link rel="stylesheet" type="text/css" href="../css/wrr.css" th:href="@{${uiPath} + ${appName} + '/css/wrr.css'}"/>
    <link rel="stylesheet" type="text/css" href="../css/zdialog.css" th:href="@{${uiPath} + ${appName} + '/css/zdialog.css?v=20171220'}"/>

</head>
<body>
  <div class="zong">
   <div class="toubu">
   <a href="CLSIndex.html">
     <img class="fanhui" src="../images/raw_1503386635.png" alt="" th:src="@{${uiPath} + ${appName} + '/images/raw_1503386635.png'}">
   </a>
      <p class="biaoti">会装房平台设计师</p>
      <p class="shouyedd">首页</p>
   </div>

   	 <div class="xuqiu">

     <a th:href="@{'/ownerDemand/ownerSaveDesigner'}"><p class="fabu">发布需求单</p></a>
      <a href="YZ_GuanZShejis.html"><p class="guanzhu">我的关注</p></a>
   	 	<img class="dingwei" src="../images/raw_1503289426.png" alt="" th:src="@{${uiPath} + ${appName} + '/images/raw_1503289426.png'}">
      <!-- <img class="selectcial" src="images/select.png" alt=""> -->
   	 	<form class="citylist">
       <select class="selecity">
        <option value="济南">济南</option>
        <option value="青岛">青岛</option>
        <option value="临沂">临沂</option>
        <option value="泰安">泰安</option>
       </select>
      </form>
   	 </div>
   <div class="kuai"></div>
   <div class="map">
     	<p class="zhaoren">地图找设计师</p>
     	<div id="ditu">
     		<!-- <img class="dituimage" src="images/staticmap_en.png" alt=""> -->
     	</div>
   </div>
   <div class="saixuan">
        <p class="liebiao">设计师列表</p>
        <p class="jiedanshu">接单数</p>
        <img class="xiala1" src="../images/raw_1503289656.png" alt="" th:src="@{${uiPath} + ${appName} + '/images/raw_1503289656.png'}">
        <p class="haopinglv">好评率</p>
        <img class="xiala2" src="../images/raw_1503289656.png" alt="" th:src="@{${uiPath} + ${appName} + '/images/raw_1503289656.png'}">
   </div>
   <div class="shejishilibiao">

   </div>
  </div>

	<script type="text/javascript" src="../js/flexible.js" th:src="@{${uiPath} + ${appName} + '/js/flexible.js'}"></script>
    <script type="text/javascript" src="../js/jquery.min.js" th:src="@{${uiPath} + ${appName} + '/js/jquery.min.js'}"></script>
    <!-- <script type="text/javascript" src="js/touch.js"></script> -->
   <!--  <script src="http://api.map.baidu.com/api?v=2.0&ak=BCy4SdrGcsabvjyoQbOMcW3kIyoV6xFL" type="text/javascript"></script> -->
   <!-- <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.0&key=dea2a41a59684cf41c90e894c043218b"></script> -->
  <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" th:src="'http://res.wx.qq.com/open/js/jweixin-1.2.0.js'"></script>
  <script type="text/javascript" src="../js/zdialog.js" th:src="@{${uiPath} + ${appName} + '/js/zdialog.js?v=20171222'}"></script>

  <script type="text/javascript" src="../js/wrr.js" th:src="@{${uiPath} + ${appName} + '/js/wrr.js'}"></script>
<script  th:inline="javascript">
    var distanceType=0;

    var qiehuanType=0;
    var data="";

    var accuracy = "";
    $(document).ready(function(){
        $.DialogByZ.Loading(/*[[${uiPath}+${appName}+'/images/loading.png']]*/);

        $.ajax({
            url:"/designerIndex/lockDesigner",
            dataType:"json",
            type:'post',
            data:{"distanceType":distanceType},
            success:function (result) {
                $.DialogByZ.Close();
                distanceType=result.data.distanceType+1;

                if(result.code==1){

                    if(result.data.list.length!=0){
                        var data1=result.data.list;
                        $('.shejishilibiao').empty();

                        for(var i=0;i<data1.length;i++){

                            var div= $("<div class='renwuliebiao'></div>");
                            var a= $("<a href='/designerIndex/designerInfo?id=" + data1[i].id + "' ></a>");
                            var dl=$("<dl></dl>");
                            var dt=$("<dt class='touxiang'></dt>");
                            var img ="<img  id='imgg0' src='" + data1[i].imgUrl + "'>"
                            var dd="<dd class='renwuxinxi'><p class='name'>"+ data1[i].userName+"</p><p class='anlishu'>案例数：<span>"+data1[i].anliCount+"</span></p><p class='phone'>电话:<span>"+data1[i].phone+"</span></p><p class='linian'>设计理念:<span>"+data1[i].userContent+"</span></p><p class='anlishu'>距离您:<span>"+data1[i].distanceKm+"千米</span></p></dd> ";
                            dt.append(img);
                            dl.append(dt);
                            dl.append(dd);
                            a.append(dl);
                            div.append(a);
                            $('.shejishilibiao').append(div);
                        }
                        data=result.data.list.toString();

                    }else{

                    }

                    $('.loadingd').show();

                }
                else{
                }

            }

        })
    });
    wx.ready(function(){
        /*
        /!*获取“分享到朋友圈”按钮点击状态及自定义分享内容接口*!/
        wx.onMenuShareTimeline({
            title: '', // 分享标题
            link: '', // 分享链接
            imgUrl: '', // 分享图标
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });*/

        wx.ready(function(){
            wx.getLocation({
                type:'wgs84',
                success:function (res) {
                    lat = res.latitude;
                    lng = res.longitude;
                    accuracy = res.accuracy;

                }
            })


        })



    });
    function getDocumentTop() {

        var scrollTop = 0, bodyScrollTop = 0, documentScrollTop = 0;

        if (document.body) {

            bodyScrollTop = document.body.scrollTop;

        }

        if (document.documentElement) {

            documentScrollTop = document.documentElement.scrollTop;

        }

        scrollTop = (bodyScrollTop - documentScrollTop > 0) ? bodyScrollTop : documentScrollTop;    return scrollTop;

    }



    //可视窗口高度

    function getWindowHeight() {

        var windowHeight = 0;    if (document.compatMode == "CSS1Compat") {

            windowHeight = document.documentElement.clientHeight;

        } else {

            windowHeight = document.body.clientHeight;

        }

        return windowHeight;

    }



    //滚动条滚动高度

    function getScrollHeight() {

        var scrollHeight = 0, bodyScrollHeight = 0, documentScrollHeight = 0;

        if (document.body) {

            bodyScrollHeight = document.body.scrollHeight;

        }

        if (document.documentElement) {

            documentScrollHeight = document.documentElement.scrollHeight;

        }

        scrollHeight = (bodyScrollHeight - documentScrollHeight > 0) ? bodyScrollHeight : documentScrollHeight;    return scrollHeight;

    }
    window.onscroll = function () {

        //监听事件内容

        if(getScrollHeight() == getWindowHeight() + getDocumentTop()){

            //当滚动条到底时,这里是触发内容

            //异步请求数据,局部刷新dom
            /*       var p = " <div class=\"loadingd\">\n" +
                       "                <p class=\"loadding\">加载中</p>\n" +
                       "                </div>"

                   $('.spzshi').append(p);*/
            if(qiehuanType==0){
                $.ajax({
                    url:"/designerIndex/lockDesigner",
                    dataType:"json",
                    type:'post',
                    data:{"distanceType":distanceType+1,"lng":lng,"lat":lat},
                    success:function (result) {
                        distanceType=result.data.distanceType;

                        if(result.code==1){
                            if(data.toString()==result.data.list.toString()){
                                data=result.data.list.toString();
                                /*
                                                                    $('.loadingd').hide();
                                */

                            }else{
                                if(result.data.list.length!=0){
                                    var data1=result.data.list;
                                    $('.shejishilibiao').empty();

                                    for(var i=0;i<data1.length;i++){

                                        var div= $("<div class='renwuliebiao'></div>");
                                        var a= $("<a href='/designerIndex/designerInfo?id=" + data1[i].id + "' ></a>");
                                        var dl=$("<dl></dl>");
                                        var dt=$("<dt class='touxiang'></dt>");
                                        var img ="<img  id='imgg0' src='" + data1[i].imgUrl + "'>"
                                        var dd="<dd class='renwuxinxi'><p class='name'>"+ data1[i].userName+"</p><p class='anlishu'>案例数：<span>"+data1[i].anliCount+"</span></p><p class='phone'>电话:<span>"+data1[i].phone+"</span></p><p class='linian'>设计理念:<span>"+data1[i].userContent+"</span></p><p class='anlishu'>距离您:<span>"+data1[i].distanceKm+"千米</span></p></dd> ";
                                        dt.append(img);
                                        dl.append(dt);
                                        dl.append(dd);
                                        a.append(dl);
                                        div.append(a);
                                        $('.shejishilibiao').append(div);
                                    }
                                    data=result.data.list.toString();

                                }else{
                                    $('.loadingd').hide();

                                }
                            }
                        }
                        else{
                            alert(result.data);
                        }

                    }

                })
            }else{

            }
        }

    }
    </script>
</body>
</html>
